package actiuniTest;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import javax.swing.JMenuItem;

import org.junit.Test;

import actiuni.Command;
import actiuni.ShowHistory;

public class ShowHistoryTest {


	@Test
	public void testInstance(){
		Command c = new ShowHistory();
		assertEquals("Should be ShowHistory","ShowHistory",c.toString());
		assertTrue("Should be instance of JMenuItem",c instanceof JMenuItem);
	}
	
	@Test
	public void testTitle(){
		JMenuItem c = new ShowHistory("ShowHistory");
		assertEquals("Name Should be ShowHistory","ShowHistory",c.getText());
	}
}
